package cn.smile.controller.log;

import cn.smile.bean.dto.log.LogInfoDTO;
import cn.smile.bean.form.log.log.LogQueryForm;
import cn.smile.business.log.ILogInfoService;
import cn.smile.commons.response.MyResult;
import com.baomidou.mybatisplus.core.metadata.IPage;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import jakarta.annotation.Resource;

/**
 * @author smile-jt
 */
@Slf4j
@RestController
@RequestMapping("api/log")
public class LogController {

    @Resource
    private ILogInfoService service;

    @PostMapping(value = "query/page")
    public MyResult<IPage<LogInfoDTO>> queryPage(@RequestBody LogQueryForm form) {
        return MyResult.OK(service.queryPage(form));
    }
}
